x86: vMCE injection
authorLiu, Jinsong <jinsong.liu@intel.com>
Wed, 26 Sep 2012 10:05:10 +0000 (12:05 +0200)
committerLiu, Jinsong <jinsong.liu@intel.com>
Wed, 26 Sep 2012 10:05:10 +0000 (12:05 +0200)
commit513e591c04d9d4f9ffe9ec282daaba798c30c176
treee585cd3df7fa4c3dbf816fd1e9d9f716fbe02e17
parent975b5bdf27031adef6587bb5c92b7a5800e051f1
x86: vMCE injection

In our test for win8 guest mce, we find a bug that no matter what
SRAO/SRAR error xen inject to win8 guest, it always reboot.

The root cause is, current Xen vMCE logic inject vMCE# only to vcpu0,
this is not correct for Intel MCE (Under Intel arch, h/w generate MCE#
to all CPUs).

This patch fixes vMCE injection bug, injecting vMCE# to all vcpus on
Intel platforms.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
- increase flexibility be making new second argument of inject_vmce() a
  VCPU ID rather than just a boolean

Acked-by: Christoph Egger <Christoph.Egger@amd.com> (on just this change)
- fix condition evaluation order in inject_vmce()

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/mcheck/mce.h
xen/arch/x86/cpu/mcheck/mce_intel.c
xen/arch/x86/cpu/mcheck/vmce.c